<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title>长沙直复信息科技有限公司综合业务管理系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="../script/base-import.js"></script>
	<script type="text/javascript">
function closeWin() {
	baseJs.getOpenWindow().dialog.close();
}
 //修改密码
function save() {
	var $original = $('#original');
	var $newpass = $('#txtNewPass');
	var $rePass = $('#txtRePass');
	if($original.val().length < 4 && $original.val().length >=0 ){
		if($original.val().length == 0){
			alert('系统提示','请输入原始密码','warning');
			return false;
		}else{
			alert('系统提示','原始密码最少有4位数！','warning');
			return false;
		}
	}
	if($newpass.val().length < 4 && $newpass.val().length >= 0){
		if ($newpass.val().length == 0) {
			alert('系统提示', '请输入密码！', 'warning');
			return false;
		} else {
			alert('系统提示', '新密码不能少于4位！', 'warning');
			return false;
		}
	}
	
	if ($rePass.val().length == 0) {
		alert('系统提示', '请在一次输入密码！', 'warning');
		return false;
	}
	
	if ($newpass.val() != $rePass.val()) {
		alert('系统提示', '两次密码不一至！请重新输入', 'warning');
		$("#txtNewPass").val("");
		$("#txtRePass").val("");
		return false;
	}
	$.post(host + "userAction/updateMi.html", {
			"original": $("#original").val(), "password": $("#txtNewPass").val()
		},
		function(data) {
			baseJs.getOpenWindow().alert(data.msg);
			if (data.status == "ok") {
				closeWin();
			}
		}, 
	"json");
}
	</script>
</head>
<body>
	<div region="center" border="false" style="padding:10px;background:#fff;overflow:hidden;">
		<table cellpadding=3 align="center" >
			<tr>
				<td>原始密码：</td>
				<td><input id="original" type="Password" class="txt01" /></td>
			</tr>
			<tr>
				<td align="right">新密码：</td>
				<td><input id="txtNewPass" type="Password" class="txt01" /></td>
			</tr>
			<tr>
				<td>确认密码：</td>
				<td><input id="txtRePass" type="Password" class="txt01" /></td>
			</tr>
		</table>
	</div>
	<div region="south" border="false" style="text-align:right;height:35px;line-height:30px;padding:5px">
		<a class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" onclick="save()">确定</a>
		<a class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)" onclick="closeWin()">取消</a>
	</div>
</body>
</html>